package com.itheima.advance.enumm.dem02;

public class SeasonDemo {

    public static void main(String[] args) {

        String name = Season.SPRING.name();
        System.out.println(name);
        System.out.println("----------1-----------------");
        System.out.println(Season.SPRING.ordinal());
        System.out.println(Season.AUTUMN.ordinal());
        System.out.println("------------2---------------");
        System.out.println(Season.AUTUMN.compareTo(Season.SPRING));
        System.out.println(Season.AUTUMN.toString());
        System.out.println("--------------3-----------------");
        Season season = Enum.valueOf(Season.class, "SPRING");
        System.out.println(season);
        System.out.println("----------4--------------");
        Season[] seasons = Season.values();
        for (Season sea : seasons){
            System.out.println(sea);
        }

    }
}
